export function generateSilentAudioUrl(duration: number) {
  const worker = new Worker(new URL('./gen-audio.worker.ts', import.meta.url), {
    type: 'module'
  });

  worker.postMessage({ duration });

  return new Promise<string>((resolve) => {
    worker.onmessage = (event) => {
      resolve(event.data);
    };
  });
}
